Optimal. Leaf size=181 \[ \frac {(3 A-7 B+11 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {(3 A-9 B+13 C) \tan (c+d x)}{3 a d \sqrt {a+a \sec (c+d x)}}+\frac {(3 A-3 B+7 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{6 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.32, antiderivative size = 181, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used = {4169, 4095,
4086, 3880, 209} \begin {gather*} \frac {(3 A-7 B+11 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(3 A-3 B+7 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{6 a^2 d}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{2 d (a \sec (c+d x)+a)^{3/2}}-\frac {(3 A-9 B+13 C) \tan (c+d x)}{3 a d \sqrt {a \sec (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3880
Rule 4086
Rule 4095
Rule 4169
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx &=-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac {\int \frac {\sec ^2(c+d x) \left (2 a (B-C)+\frac {1}{2} a (3 A-3 B+7 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{2 a^2}\\ &=-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac {(3 A-3 B+7 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{6 a^2 d}+\frac {\int \frac {\sec (c+d x) \left (\frac {1}{4} a^2 (3 A-3 B+7 C)-\frac {1}{2} a^2 (3 A-9 B+13 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{3 a^3}\\ &=-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {(3 A-9 B+13 C) \tan (c+d x)}{3 a d \sqrt {a+a \sec (c+d x)}}+\frac {(3 A-3 B+7 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{6 a^2 d}+\frac {(3 A-7 B+11 C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{4 a}\\ &=-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {(3 A-9 B+13 C) \tan (c+d x)}{3 a d \sqrt {a+a \sec (c+d x)}}+\frac {(3 A-3 B+7 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{6 a^2 d}-\frac {(3 A-7 B+11 C) \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{2 a d}\\ &=\frac {(3 A-7 B+11 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {(3 A-9 B+13 C) \tan (c+d x)}{3 a d \sqrt {a+a \sec (c+d x)}}+\frac {(3 A-3 B+7 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{6 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 25.36, size = 7119, normalized size = 39.33 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(866\) vs.
\(2(158)=316\).
time = 0.18, size = 867, normalized size = 4.79
method | result | size |
default | \(\text {Expression too large to display}\) | \(867\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.11, size = 483, normalized size = 2.67 \begin {gather*} \left [-\frac {3 \, \sqrt {2} {\left ({\left (3 \, A - 7 \, B + 11 \, C\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (3 \, A - 7 \, B + 11 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (3 \, A - 7 \, B + 11 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, a \cos \left (d x + c\right )^{2} + 2 \, a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 4 \, {\left ({\left (3 \, A - 15 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{2} - 12 \, {\left (B - C\right )} \cos \left (d x + c\right ) - 4 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{24 \, {\left (a^{2} d \cos \left (d x + c\right )^{3} + 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d \cos \left (d x + c\right )\right )}}, -\frac {3 \, \sqrt {2} {\left ({\left (3 \, A - 7 \, B + 11 \, C\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (3 \, A - 7 \, B + 11 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (3 \, A - 7 \, B + 11 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) + 2 \, {\left ({\left (3 \, A - 15 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{2} - 12 \, {\left (B - C\right )} \cos \left (d x + c\right ) - 4 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{12 \, {\left (a^{2} d \cos \left (d x + c\right )^{3} + 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d \cos \left (d x + c\right )\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}}{\left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.93, size = 294, normalized size = 1.62 \begin {gather*} \frac {\frac {{\left ({\left (\frac {3 \, {\left (\sqrt {2} A a \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - \sqrt {2} B a \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + \sqrt {2} C a \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{a} - \frac {2 \, {\left (3 \, \sqrt {2} A a \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 15 \, \sqrt {2} B a \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 23 \, \sqrt {2} C a \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )}}{a}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {3 \, {\left (\sqrt {2} A a \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 9 \, \sqrt {2} B a \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 9 \, \sqrt {2} C a \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )}}{a}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}} - \frac {3 \, {\left (3 \, \sqrt {2} A - 7 \, \sqrt {2} B + 11 \, \sqrt {2} C\right )} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} a \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\cos \left (c+d\,x\right )}^2\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________